package ar.fiuba.tp7552.buildadmin.webactions;

import java.util.Map;

import org.apache.struts2.util.StrutsTypeConverter;

import ar.fiuba.tp7552.buildadmin.model.builds.TipoPropiedad;
import ar.fiuba.tp7552.buildadmin.service.PermissionType;

@SuppressWarnings("all")
public class TipoPropiedadConverter extends StrutsTypeConverter {

	/**
     * Converts one or more String values to the specified class.
     *
     * @param context the action context
     * @param values  the String values to be converted, such as those submitted from an HTML form
     * @param toClass the class to convert to
     * @return the converted object
     */
	public Object convertFromString(Map context, String[] values, Class toClass) {
    	if (toClass.equals(TipoPropiedad.class)) {
    		TipoPropiedad tipo = new TipoPropiedad();
    		tipo.setId(Long.valueOf(values[0]));
    		return tipo;
		}
		return null;
	}

	@Override
	public String convertToString(Map arg0, Object arg1) {
		return null;
	}
}